package com.zz.schoolwall.service.impl;

import com.zz.schoolwall.dao.SchoolWallMediaDao;
import com.zz.schoolwall.domain.SchoolWallMediaDO;
import com.zz.schoolwall.service.SchoolWallMediaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class SchoolWallMediaServiceImpl implements SchoolWallMediaService {
    @Autowired
    private SchoolWallMediaDao schoolWallMediaDao;


    @Override
    public int remove(Long mediaId) {
        return schoolWallMediaDao.deleteByPrimaryKey(mediaId);
    }

    @Override
    public int save(SchoolWallMediaDO record) {
        return schoolWallMediaDao.insertSelective(record);
    }

    @Override
    public SchoolWallMediaDO get(Long mediaId) {
        return schoolWallMediaDao.selectByPrimaryKey(mediaId);
    }
    @Override
    public List<SchoolWallMediaDO> list(Map<String,Object> map) {
        return schoolWallMediaDao.list(map);
    }

    @Override
    public int update(SchoolWallMediaDO record) {
        return schoolWallMediaDao.updateByPrimaryKeySelective(record);
    }
}